﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace MySkiPatrolEntity
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ISignIn" in both code and config file together.
    [ServiceContract]
    public interface ISignIn
    {
        [OperationContract]
        string Version();

        [OperationContract]
        List<ValueKeyPair> GetAppSettings(Patrol data);

        [OperationContract]
        ScanResponse EmployeeIDScan(ScanRequest data);

        [OperationContract]
        void EmployeeSignOut(ScanResponse data);

        [OperationContract]
        List<ScanResponse> GetDialySignins(Patrol data);

        [OperationContract]
        void CloseDailySignins(ScanRequest data);

        [OperationContract]
        List<Member> GetEmployeesWithNoID(Patrol data);

        [OperationContract]
        List<ScanResponse> AssignIDCardToMember(ScanResponse data);
    }
    [DataContract]
    public class EmployeeSignIn
    {
        [DataMember]
        public string ServiceDayID { get; set; }
        [DataMember]
        public string MemberID { get; set; }
        [DataMember]
        public DateTimeOffset SignIn { get; set; }
        [DataMember]
        public DateTimeOffset SignOut { get; set; }
        [DataMember]
        public DataTransaction DataTransaction { get; set; }
    }

    [DataContract]
    public class ScanRequest
    {
        public ScanRequest() { }

        [DataMember]
        public string IDCardString { get; set; }
        [DataMember]
        public DateTimeOffset ScanDateTime { get; set; }
        [DataMember]
        public DataTransaction DataTransaction { get; set; }
    }

    [DataContract]
    public class ScanResponse
    {
        public ScanResponse() { }

        [DataMember]
        public DateTimeOffset ScanDateTime { get; set; }
        [DataMember]
        public string IDCardString { get; set; }
        [DataMember]
        public string MemberID { get; set; }
        [DataMember]
        public string MemberName { get; set; }
        [DataMember]
        public bool IsSignedIn { get; set; }
        [DataMember]
        public DateTimeOffset SignIn { get; set; }
        [DataMember]
        public DateTimeOffset SignOut { get; set; }
        [DataMember]
        public string Assignment { get; set; }
        [DataMember]
        public string Radio { get; set; }
        [DataMember]
        public bool AssignEmployeeIDCard { get; set; }

        [DataMember]
        public DataTransaction DataTransaction { get; set; }

    }
}

